package com.ccc.demo1;

import scala.runtime.AbstractFunction2;

import java.io.Serializable;

//消息归并方法
public class MyMergeMsg extends AbstractFunction2<String, String, String> implements Serializable {
    @Override
    public String apply(String a, String b) {

        if (a.equals("black")) {
            return "black";
        }
        if (b.equals("black")) {
            return "black";
        }
        return "white";
    }
}
